﻿using System;
using System.Data.Entity;
using System.Linq;

namespace WeBlog.Interfaces
{    
    public interface IUnitOfWork : IDisposable
    {        
        void Commit();
        void Attach<T>(T entity) where T : class, IModel;
        void Add<T>(T entity) where T : class, IModel;
        IDbSet<T> DbSet<T>() where T : class, IModel;
        T Find<T>(params object[] keyValues) where T : class, IModel;
        bool Remove<T>(T item) where T : class, IModel;
    }
}
